<!DOCTYPE HTML>
<html>
<head>
<#include "WEB-INF/view/_frag/meta.ftl">
<#include "WEB-INF/view/_frag/jscss.ftl">
<title>申瓯项目管理系统 - 登录</title>
</head>
<body>
<input type="hidden" id="TenantId" name="TenantId" value="" />
<div class="header"><img src="${basePath}/asset/hui/static/h-ui.admin/images/admin-header-logo.png"></div>
<div class="loginWraper">
  <div class="login-header-bg">
  	<img src="${basePath}/asset/hui/static/h-ui.admin/images/admin-login-bg.png">
  </div>
  <div id="loginform" class="loginBox">
    <form class="form form-horizontal">
      <div class="row cl">
        <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60d;</i></label>
        <div class="formControls col-xs-8">
          <input id="loginname" name="loginname" type="text" placeholder="用户名" class="input-text size-L" style="border-radius: 200px 200px" required="required">
        </div>
      </div>
      <div class="row cl">
        <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60e;</i></label>
        <div class="formControls col-xs-8">
          <input id="password" name="password" type="password" placeholder="密码" class="input-text size-L" style="border-radius: 200px 200px" required="required">
        </div>
      </div>
      <div class="row cl">
        <div class="formControls col-xs-8 col-xs-offset-3">
          <input id="inValiCode" name="inValiCode" type="text" placeholder="验证码" class="input-text radius size-L" style="width:150px;border-radius: 200px 200px">
          <a href="javascript:void(0);" onclick="_verification_reload()" ><img id="_verification"  style=" width:90px ;height: 30px;border-radius: 2px; " src="${basePath}/index/writeImgae"/></a>
		</div>
      </div>
      
      <div class="row cl">
      </div>
      <div class="row cl">
        <div class="formControls col-xs-8 col-xs-offset-3">
          <input name="" type="button"  onclick="return check()" class="btn btn-success radius size-L" style="background: rgb(38,138,238);border-radius:100px 100px" value="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;">
        
<!--          <input name="" type="reset" class="btn btn-default radius size-L" value="&nbsp;取&nbsp;&nbsp;&nbsp;&nbsp;消&nbsp;">-->
        </div>
      </div>
    </form>
  </div>
</div>
<div class="footer">Copyright&nbsp;&nbsp;申瓯通信设备有限公司</div>
</body>
<script>
		if (self != top) {
			parent.window.location.replace(window.location.href);
		}
		function check() {
			var loginname = $("#loginname").val();
			var password = $("#password").val();
			var code = $("#inValiCode").val();
			$.post("${basePath}/index/checkout", {
				login_name : loginname,
				password : password,
				code : code
			}, function(data) {
				//console.log(data);
				if(data == 0){
					//layer.alert("账号或密码错误！",{icon:0});
					 alert("账号或密码错误！");
				}else if(data == 1){
					window.location.href = "${basePath}/index/index";
				} 
				/* if (data == -1) {
					layer.alert("验证码错误",{icon:0});
				} else if (data == -2) {
					layer.alert("请先退出其它登录。",{icon:0});
				} else if (data == 0) {
					window.location.href = "${basePath}/index/index";
				} else if (data == 1) {
					layer.alert("无此用户",{icon:0});
				} else {
					layer.alert("密码不正确",{icon:0});
				} */
			});
		}
		
		function _verification_reload(){
			$("#_verification").attr("src","${basePath}/index/writeImgae?a="+Math.random());
		}
</script>
</html>